//part1:C03:ex3.35.cpp -- used pointer to assign an array.
#include <iostream>

int main(void)
{
    using namespace std;
    const int sz = 10;
    int a[sz], i = 0;
    for (int i = 0; i < 10; ++i)
    {
        a[i] = i;    
    }

    for (auto val : a) 
    {
        cout << val << " ";    
    }
    cout << endl;
    int *ptr = begin(a);
    while (ptr != end(a))
    {
        *ptr = 0;
        ptr++;
    }
    cout << "after array is:" << endl;
    for (auto val : a)
    {
        cout << val << " ";    
    }
    cout << endl;
    return 0;
}
